import { Categroy } from "../type/entity";
import { http } from "../util/http";


export function saveCategory(categoryName:string, description:string){
  return http.post<Categroy>('/saveCategory', {categoryName, description})
}

export function getCategories(){
  return http.post<Categroy[]>('/getCategoriesByAccount')
}

export function removeCategory(id:number){
  return http.post<{success:boolean}>('/removeCategory', {id})
}